<!--  -->
<template>
  <div v-if="Object.keys(goods).length !== 0">
      <div class="title">{{goods.title}}</div>
      <div>
          <span class="newPrice">{{goods.newPrice}}</span>
          <span class="oldPrice">{{goods.oldPrice}}</span>
          <span class="discount">{{goods.discount}}</span>
      </div>
      <div class="columns">
          <span>{{goods.columns[0]}}</span>
          <span class="center">{{goods.columns[1]}}</span>
          <span class="right">{{goods.services[goods.services.length-1].name}}</span>
      </div>
      <div class="services">
          <span v-for="index in goods.services.length-1" :key="index" class="services_item">
              <img :src="goods.services[index-1].icon" alt="">
              <span>{{goods.services[index-1].name}}</span>
          </span>
      </div>
  </div>
</template>

<script>
export default {
  data () {
    return {
      
    }
  },
  props:{
      goods:{
          type:Object,
          default () {
              return {}
          }
      }
  }
}
</script>

<style  scoped>
    .title{
        padding: 8px 5px;
        font-size: 16px;
    }
    .newPrice{
        color: var(--color-high-text);
        font-size: 22px;
        padding-left: 5px;
    }
    .oldPrice{
        color: #aaa;
        font-size: 12px;
        text-decoration: line-through;
        padding: 0 3px;
    }
    .discount{
       /* position: relative; */
       background-color: var(--color-tint);
       border-radius: 7px;
       color: #fff;
       margin-bottom: 5px;
       padding: 2px;
    }
    .columns{
        display: flex;
        font-size: 12px;
        color: #aaa;
        padding:20px 5px 10px 5px;
    }
    .columns span {
        flex: 1;
    }
    .center{
        text-align: center;
    }
    .right{
        text-align: right;
    }
    .services{
        display: flex;
        font-size: 13px;
        color: #aaa;
        padding: 10px 5px 15px;
        border-top: 1px solid #eee;
        border-bottom: 2px solid #eee;
    }   
    .services_item{
        flex: 1;
    }
    .services_item img{
        width: 14px;
        height: 14px;

    }
    
</style>
